public class 九的个数 {
    public static void main(String[] args) {
        //1到100的9的个数
        int count = 0;
        for (int i = 0; i <= 100; i++)
        {
            if (i % 10 == 9)
            {
                count++;
            }
            if (i / 10 == 9)
            {
                count++;
            }
        }
        System.out.println(count);
    }
}
